#include <REGX52.H>
#include "LCD1602.h"
#include "DS18B20.h"
#include "DELAY.h"

int main()
{
	float t=0;
	LCD_Init();
	DS18B20_Convert();
    Delay(500);

	while(1)
	{
		DS18B20_Convert();
		t=DS18B20_ReadTempture();
		LCD_ShowSignedNum(1,1,t,3);//只能显示整数
		LCD_ShowChar(1,5,'.');
		LCD_ShowNum(1,6,(unsigned long)(t*10000)%100000,4);//小数位显示思路：转换为整数后取余
	}
	return 0;
}
